import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        params
    })
}

//获取盲盒奖品信息
export function statistic(id) {
    return request({
        url: `/box/activity/statistic/${id}`,
        method: 'get',
    })
}

//获取盲盒活动参与用户
export function customerList(params) {
    return request({
        url: `/box/activity/customer/list`, 
        method: 'get',
        params
    })
}
//导出盲盒活动参与用户
export function exportCustomerList(query) {
    return request({
      url: '/box/activity/customer/export',
      method: 'get',
      params: query
    })
}


//添加盲盒奖品数量
export function addBoxPrizeNum(data) {
    return request({
      url: '/box/prize/addBoxPrizeNum',
      method: 'post',
      data
    })
}
//添加虚拟用户
export function addVirtual(data) {
    return request({
      url: '/box/activity/virtual/customer/add',
      method: 'post',
      data
    })
}


//修改用户虚拟数
export function editVirtual(data) {
    return request({
      url: '/box/activity/customer/virtual',
      method: 'put',
      data
    })
}

//获取盲盒活动订单
export function getOrderList(params) {
    return request({
        url: `/box/activity/order/list`,
        method: 'get',
        params
    })
}

//获取盲盒开奖名单
export function jackpotList(params) {
    return request({
        url: `/box/activity/jackpot/record/list`,
        method: 'get',
        params
    })
}

//添加开奖名单
export function addJackpotCustomer(data) {
    return request({
      url: '/box/activity/jackpot/customer/add',
      method: 'post',
      data
    })
}

//开奖阶段选择列表
export function stageList(id) {
    return request({
        url: `/box/activity/stage/list/${id}`,
        method: 'get',
    })
}

//开奖奖项选择列表
export function stagePrizeList(stageId) {
    return request({
        url: `/box/activity/stagePrize/list/${stageId}`,
        method: 'get',
    })
}

//获取开奖名单
export function jackpotRecord(id) {
    return request({
        url: `/box/activity/jackpot/record/${id}`,
        method: 'get',
    })
}
//修改开奖名单
export function editCustomerModify(data) {
    return request({
      url: '/box/activity/jackpot/customer/modify',
      method: 'post',
      data
    })
}
//删除开奖名单
export function deleteCustomer(id) {
    return request({
      url: `/box/activity/jackpot/customer/delete/${id}`,
      method: 'post',
    })
}
